package com.mall.b2c.domain.card;

/**
 * Created by chen on 17/1/19.
 */

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.mall.b2c.domain.member.MemberDomain;
import com.mall.common.domain.BaseEntity;

import javax.persistence.*;

/**
 * 充值卡使用记录
 */
@Entity
@Table(name = "b2c_card_log")
public class CardLogDomain extends BaseEntity {
    @JsonIgnore
    private MemberDomain memberDomain;
    @JsonIgnore
    private CardDomain cardDomain;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "member_id")
    public MemberDomain getMemberDomain() {
        return memberDomain;
    }

    public void setMemberDomain(MemberDomain memberDomain) {
        this.memberDomain = memberDomain;
    }

    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "card_id")
    public CardDomain getCardDomain() {
        return cardDomain;
    }

    public void setCardDomain(CardDomain cardDomain) {
        this.cardDomain = cardDomain;
    }
}
